<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="Shortcut Icon" href="https://www.duodaiwang.com/images/favicon.ico">
  <title>多贷网SaaS</title>
  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
    <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet">
    <!-- <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>" crossorigin="anonymous"></script> -->
  <% } %>
  <script src="https://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
  <style>
    /* html,body {
      height: 100%;
      margin:0;
      padding:0;
    } */
  </style>
</head>
<!-- overflow-y: auto; 抵消body默认height100% 解决不能滚动的问题 -->
<!-- <body style="height: auto;"> -->
<body >
  <noscript>
    <strong>We're sorry but zhizhu-SaaS-system doesn't work properly without JavaScript enabled. Please enable it to
      continue.</strong>
  </noscript>
  <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
    <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>" crossorigin="anonymous"></script>
  <% } %>
  <div id="app"></div>
  <!-- <div id="app"></div> -->
</body>

</html>
<script type="text/javascript">
  //测试公共方法
  function testFun(params) {
    // console.log("测试方法执行了" + params);
  }
  //登陆页面获取验证码按钮倒计时
  function timeCountdown(obj) { //obj包括timer、waitTime 、canGet 
    const TIME_COUNT = 60; //默认倒计时秒数
    if (!obj.timer) {
      obj.waitTime = TIME_COUNT;
      obj.canGet = false;
      obj.timer = setInterval(() => {
        if (obj.waitTime > 0 && obj.waitTime <= TIME_COUNT) {
          obj.waitTime--;
        } else {
          obj.canGet = true;
          clearInterval(obj.timer); //清空定时器
          obj.timer = null;
        }
      }, 1000)
    }
    return {
      timer: obj.timer,
      canGet: obj.canGet,
      waitTime: obj.waitTime
    }
  }
  //发送字符串的方法
  function cleanArray(actual) {
    const newArray = [];
    for (let i = 0; i < actual.length; i++) {
      if (actual[i]) {
        newArray.push(actual[i]);
      }
    }
    return newArray;
  }
  // 将一个对象转成QueryString
  function toQueryString(obj) {
    if (!obj) return "";
    return cleanArray(
      Object.keys(obj).map(key => {
        if (obj[key] === undefined) return "";
        return encodeURIComponent(key) + "=" + encodeURIComponent(obj[key]);
      })
    ).join("&");
  }
  //设置tabs栏固定
  document.addEventListener('scroll', function (event) {
    var scrollDistance = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
    if (scrollDistance >= 90) { // 触发的位置
        document.getElementsByClassName('el-tabs')[0].style.cssText = 'position: fixed; top: 0;z-index:990';
        document.querySelector("#index-main > div:nth-child(2)").style.cssText = 'position: relative; margin-top:45px ;z-index:980';
      }
      else {
        document.getElementsByClassName('el-tabs')[0].style.cssText = 'position:static;';
        document.querySelector("#index-main > div:nth-child(2)").style.cssText = 'position:static;';
      }
    });
  
</script>